/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.srcptit.trainning.thompv.btvn1;
import java.util.Scanner;
/**
 *
 * @author SONY
 */
public class Bai3Muc1 {
    public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        long a,i=2;
        a=sc.nextLong();
        while(a>1)
        {
            if(a%i==0)
            {
                System.out.print(i+"  ");
                a=a/i;
            }
            else i++;
        }
        System.out.println("");
    }
    
}
